package fri.pipt.agent.deathrow;

/**
 * 
 * @author dejvid
 *
 * Hrani vidno potročje 
 */
public class ObservableArea
{
	public int minX, minY;
	public int maxX, maxY;
	
	/**
	 * Dodamo točko v vidno območje agenta. Ustrezno nastavi meje min[X|Y], max[X|Y]
	 * 
	 * @param x
	 * @param y
	 */

	public void pointSpoted(int x, int y)
	{
		if(x < minX)
			minX = x;
		if(maxX < x)
			maxX = x;
		if(y < minY)
			minY = y;
		if(maxY < y)
			maxY = y;
	}
	
	@Override
	public String toString()
	{
		return "vec2("+minX+","+minY+")-vec2("+maxX+","+maxY+")";
	}
}
